package com.foreknow.demo2.Test7;

public class Graduate implements Student,Teacher {
    String name;
    String sex;
    int age;
    double fee;
    double pay;
    @Override
    public void setFee(double fee) {
        this.fee = fee;
    }

    @Override
    public double getFee() {
        return fee;
    }

    @Override
    public void setPay(double pay) {
        this.pay = pay;
    }

    @Override
    public double getPay() {
        return pay;
    }

    public static void main(String[] args) {
        Graduate graduate = new Graduate();
        graduate.name = "zhangsan";
        graduate.setPay(5000);
        graduate.setFee(4900);
        double yearpay = graduate.getPay()*12;
        double yearfee = graduate.getFee()*12;
        if (yearpay - yearfee < 2000){
            System.out.println("provide a loan");
        }
    }
}
